--Not much here yet. Nothing different from the main menu.
helpMenu = {}

function helpMenu:init()
   helpBack = love.graphics.newImage('helpMenu/back.png')
   helpText = love.graphics.newImage('helpMenu/helpMenu.png')
end
--
function helpMenu:enter()
  mouseSelection = -1
end
--
function helpMenu:update(dt)
  mx,my = love.mouse.getPosition()
  
  if mx >= (788*screen.scale) and mx <= (1131*screen.scale) and my >= (868*screen.scale) and my <= (972*screen.scale) then
    mouseSelection = 0
  elseif mx >= (20*screen.scale) and mx <= (395*screen.scale) and my >= (1024*screen.scale) and my <= (1060*screen.scale) then
    mouseSelection = 1
  elseif mx >= (1688*screen.scale) and mx <= (1900*screen.scale) and my >= (1024*screen.scale) and my <= (1060*screen.scale) then
    mouseSelection = 2
  else
    mouseSelection = -1
  end
end
--
function helpMenu:draw()
  love.graphics.scale(screen.scale,screen.scale)
  
  love.graphics.setColor(255,255,255,255)
  love.graphics.draw(helpText)
  
if mouseSelection == 0 then
    love.graphics.setColor(255,0,0,255)
    love.graphics.draw(helpBack)
    love.graphics.setColor(0,255,0,255)
    if isFullscreen then
      love.graphics.draw(fullOn)
    else
      love.graphics.draw(fullOff)
    end
    if isAudioOn then
      love.graphics.draw(audioOn)
    else
      love.graphics.draw(audioOff)
    end
  elseif mouseSelection == 1 then
    love.graphics.setColor(0,255,0,255)
    love.graphics.draw(helpBack)
    love.graphics.setColor(255,0,0,255)
    if isFullscreen then
      love.graphics.draw(fullOn)
    else
      love.graphics.draw(fullOff)
    end
    love.graphics.setColor(0,255,0,255)
    if isAudioOn then
      love.graphics.draw(audioOn)
    else
      love.graphics.draw(audioOff)
    end
  elseif mouseSelection == 2 then
    love.graphics.setColor(0,255,0,255)
    love.graphics.draw(helpBack)
    if isFullscreen then
      love.graphics.draw(fullOn)
    else
      love.graphics.draw(fullOff)
    end
    love.graphics.setColor(255,0,0,255)
    if isAudioOn then
      love.graphics.draw(audioOn)
    else
      love.graphics.draw(audioOff)
    end
  else
    love.graphics.setColor(0,255,0,255)
    love.graphics.draw(helpBack)
    if isFullscreen then
      love.graphics.draw(fullOn)
    else
      love.graphics.draw(fullOff)
    end
    if isAudioOn then
      love.graphics.draw(audioOn)
    else
      love.graphics.draw(audioOff)
    end
  end
end
--
function helpMenu:keyreleased(k)
end
function helpMenu:keypressed(k)
end
--
function helpMenu:mousepressed(x,y,b)
  if b == 'l' then
    mousePrevSelection = mouseSelection
  end
end
function helpMenu:mousereleased(x,y,b)
 if b == "l" then
    if mouseSelection == 0 and mousePrevSelection == 0 then
      --Go back to the main menu
      Gamestate.switch(mainMenu)
    elseif mouseSelection == 1 and mousePrevSelection == 1 then
      isFullscreen = not isFullscreen
      toggleFullscreen()
    elseif mouseSelection == 2 and mousePrevSelection == 2 then
      isAudioOn = not isAudioOn
      if isAudioOn then
        love.audio.setVolume(1)
      else
        love.audio.setVolume(0)
      end      
    end
  end
end
